/**
 *
 * Copyright (c) 2007 Tom Deater (http://www.tomdeater.com)
 * Licensed under the MIT License:
 * http://www.opensource.org/licenses/mit-license.php
 * 
 */
 
(function($) {
	 
	$.fn.equalizeCols = function(){
		var height = 0;
  
  		if ($.browser.msie && $.browser.version <= 6.0) {
			return this
				.css("height", "auto")
				.each(function() {
					height = Math.max(height, this.offsetHeight);
				})
				.css("height", height)
				.each(function() {
					var h = this.offsetHeight;
					if (h > height) {
						$(this).css("height", height - (h - height));
					};
				});
		} else {
			return this
				.css("height", "auto")
				.each(function() {
					height = Math.max(height, this.offsetHeight);
				})
				.css("min-height", height)
				.each(function() {
					var h = this.offsetHeight;
					if (h > height) {
						$(this).css("min-height", height - (h - height));
					};
				});
		}
			
	};

})(jQuery);